const state = {
	flowId: '',
	pages: {
		total: 0,
		page: 1,
		pageSize: 10
	},
	replies: [],
	answerYesData: {
		isOtherYesNluLib: false,
		isAnswerYesNluLib: true,
		keys: []
	},
	answerNoData: {
		isOtherNoNluLib: false,
		isAnswerNoNluLib: true,
		keys: []
	}
};

const mutations = {
	SET_INTELLIGEN_FLOW_ID(target, flowId) {
		target.flowId = flowId;
	},
	SET_INTELLIGEN_PAGES(target, pages) {
		target.pages = pages;
	},
	SET_INTELLIGEN_REPLY(target, replies) {
		target.replies = replies;
	},
	SET_ANSWER_YES_DATA(target, answerYesData) {
		target.answerYesData = JSON.parse(JSON.stringify(answerYesData));
	},
	SET_ANSWER_NO_DATA(target, answerNoData) {
		target.answerNoData = JSON.parse(JSON.stringify(answerNoData));
	}
};

export default {
	// namespaced: true,
	state,
	mutations
};
